package com.yongbao.controller.wechat;

import com.yongbao.common.WebResponse;
import com.yongbao.common.annotation.WebAccess;
import com.yongbao.common.PageInfo;
import com.yongbao.model.request.DishTimeSettingRequest;
import com.yongbao.service.DishTimeSettingService;
import com.yongbao.model.vo.DishTimeSettingVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.List;

/**
 * @author zhanghong
 */
@RestController
@RequestMapping("/wechat/dishTimeSetting")
@Api(value = "【小程序端】餐品时间设置模块", tags = {"【小程序端】餐品时间设置模块"})
public class WechatDishTimeSettingController {

    @Autowired
    private DishTimeSettingService dishTimeSettingService;

    @WebAccess(login = true)
    @ApiOperation("列表查询")
    @PostMapping("/listQuery")
    public WebResponse<List<DishTimeSettingVO>> listQuery(@RequestBody DishTimeSettingRequest request) {
        return WebResponse.build(dishTimeSettingService.listQuery(request));
    }

}
